package com.tx.test;

import com.tx.test.service.LogService;
import com.tx.test.service.UserService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

//@ContextConfiguration(classes = Config.class)
@MapperScan(basePackages = "com.tx.test.mapper")
public class Main {


	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:application.xml");
		UserService userService = (UserService) context.getBean("userService");
//		LogService logService = (LogService) context.getBean("logService");

		try {
			userService.insert();//用户
//			logService.insert();//日志
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}